#ifndef _DECODEDSDFILE_H_
#define _DECODEDSDFILE_H_

#include <string>
#include <iostream>

class DecodeDSDFile
{
public:
    virtual ~DecodeDSDFile(void) {};
    virtual bool open(const std::string& file_name, double seek_seconds = 0) = 0;
    virtual uint64_t read(uint8_t* out, uint64_t size) = 0;
};

#define WARN(MSG) \
    std::cerr << MSG << ", at " __FILE__ << ":" << __LINE__ \
	<< "   " << __PRETTY_FUNCTION__ << std::endl

#define DIE(MSG) \
    do { \
	WARN(MSG); \
	exit(1); \
    } while(0)

#define ASSERT(A,MSG) if (!(A)) DIE(MSG)

#endif
